package com.chixing.day19_thread.work;

import java.util.Arrays;

public class ArrayDemo {
    public static void main(String[] args) {
        int[] a = {1,2,3,4,5,6};
        int[] b = getArray(a,2);
        System.out.println(Arrays.toString(b));
    }
    public static int[] getArray(int[] array,int num){
        for (int i=0;i<num;i++){
            for (int j=array.length-1;j>0;j--){
                int temp = array[j];
                array[j] = array[j-1];
                array[j-1] = temp;
            }
        }
        return array;
    }
}
